diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index ba704df..c0a8854 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -1,154 +1,154 @@
-<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
-/**
- * Code Igniter
- *
- * An open source application development framework for PHP 4.3.2 or newer
- *
- * @package		CodeIgniter
- * @author		Rick Ellis
- * @copyright	Copyright (c) 2006, pMachine, Inc.
- * @license		http://www.codeignitor.com/user_guide/license.html
- * @link		http://www.codeigniter.com
- * @since		Version 1.0
- * @filesource
- */
-
-// ------------------------------------------------------------------------
-
-/**
- * Code Igniter String Helpers
- *
- * @package		CodeIgniter
- * @subpackage	Helpers
- * @category	Helpers
- * @author		Rick Ellis
- * @link		http://www.codeigniter.com/user_guide/helpers/string_helper.html
- */
-
-// ------------------------------------------------------------------------
-
-/**
- * Trim Slashes
- *
- * Removes any leading/traling slashes from a string:
- *
- * /this/that/theother/
- *
- * becomes:
- *
- * this/that/theother
- *
- * @access	public
- * @param	string
- * @return	string
- */	
-function trim_slashes($str)
-{
-	return preg_replace("|^/*(.+?)/*$|", "\\1", $str);
-}
-	
-// ------------------------------------------------------------------------
-
-/**
- * Reduce Double Slashes
- *
- * Converts double slashes in a string to a single slash,
- * except those found in http://
- *
- * http://www.some-site.com//index.php
- *
- * becomes:
- *
- * http://www.some-site.com/index.php
- *
- * @access	public
- * @param	string
- * @return	string
- */	
-function reduce_double_slashes($str)
-{
-	return preg_replace("#([^:])//+#", "\\1/", $str);
-}
-	
-// ------------------------------------------------------------------------
-
-/**
- * Create a Random String
- *
- * Useful for generating passwords or hashes.
- *
- * @access	public
- * @param	string 	type of random string.  Options: alunum, numeric, nozero, unique
- * @param	integer	number of characters
- * @return	string
- */	
-function random_string($type = 'alnum', $len = 8)
-{					
-	switch($type)
-	{
-		case 'alnum'	:
-		case 'numeric'	:
-		case 'nozero'	:
-		
-				switch ($type)
-				{
-					case 'alnum'	:	$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
-						break;
-					case 'numeric'	:	$pool = '0123456789';
-						break;
-					case 'nozero'	:	$pool = '123456789';
-						break;
-				}
-
-				$str = '';
-				for ($i=0; $i < $len; $i++)
-				{
-					$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
-				}
-				return $str;
-		  break;
-		case 'unique' : return md5(uniqid(mt_rand()));
-		  break;
-	}
-}
-// ------------------------------------------------------------------------
-
-/**
- * Alternator
- *
- * Allows strings to be alternated.  See docs...
- *
- * @access	public
- * @param	string (as many parameters as needed)
- * @return	string
- */		
-function alternator()
-{
-	static $i;	
-
-	if (func_num_args() == 0)
-	{
-		$i = 0;
-		return '';
-	}
-	$args = func_get_args();
-	return $args[($i++ % count($args))];
-}
-
-// ------------------------------------------------------------------------
-
-/**
- * Repeater function
- *
- * @access	public
- * @param	string
- * @param	integer	number of repeats
- * @return	string
- */	
-function repeater($data, $num = 1)
-{
-	return str_repeat($data, $num);
-}
-
-
+<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * Code Igniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package		CodeIgniter
+ * @author		Rick Ellis
+ * @copyright	Copyright (c) 2006, pMachine, Inc.
+ * @license		http://www.codeignitor.com/user_guide/license.html
+ * @link		http://www.codeigniter.com
+ * @since		Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Code Igniter String Helpers
+ *
+ * @package		CodeIgniter
+ * @subpackage	Helpers
+ * @category	Helpers
+ * @author		Rick Ellis
+ * @link		http://www.codeigniter.com/user_guide/helpers/string_helper.html
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Trim Slashes
+ *
+ * Removes any leading/traling slashes from a string:
+ *
+ * /this/that/theother/
+ *
+ * becomes:
+ *
+ * this/that/theother
+ *
+ * @access	public
+ * @param	string
+ * @return	string
+ */	
+function trim_slashes($str)
+{
+	return preg_replace("|^/*(.+?)/*$|", "\\1", $str);
+}
+	
+// ------------------------------------------------------------------------
+
+/**
+ * Reduce Double Slashes
+ *
+ * Converts double slashes in a string to a single slash,
+ * except those found in http://
+ *
+ * http://www.some-site.com//index.php
+ *
+ * becomes:
+ *
+ * http://www.some-site.com/index.php
+ *
+ * @access	public
+ * @param	string
+ * @return	string
+ */	
+function reduce_double_slashes($str)
+{
+	return preg_replace("#([^:])//+#", "\\1/", $str);
+}
+	
+// ------------------------------------------------------------------------
+
+/**
+ * Create a Random String
+ *
+ * Useful for generating passwords or hashes.
+ *
+ * @access	public
+ * @param	string 	type of random string.  Options: alunum, numeric, nozero, unique
+ * @param	integer	number of characters
+ * @return	string
+ */	
+function random_string($type = 'alnum', $len = 8)
+{					
+	switch($type)
+	{
+		case 'alnum'	:
+		case 'numeric'	:
+		case 'nozero'	:
+		
+				switch ($type)
+				{
+					case 'alnum'	:	$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
+						break;
+					case 'numeric'	:	$pool = '0123456789';
+						break;
+					case 'nozero'	:	$pool = '123456789';
+						break;
+				}
+
+				$str = '';
+				for ($i=0; $i < $len; $i++)
+				{
+					$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
+				}
+				return $str;
+		  break;
+		case 'unique' : return md5(uniqid(mt_rand()));
+		  break;
+	}
+}
+// ------------------------------------------------------------------------
+
+/**
+ * Alternator
+ *
+ * Allows strings to be alternated.  See docs...
+ *
+ * @access	public
+ * @param	string (as many parameters as needed)
+ * @return	string
+ */		
+function alternator()
+{
+	static $i;	
+
+	if (func_num_args() == 0)
+	{
+		$i = 0;
+		return '';
+	}
+	$args = func_get_args();
+	return $args[($i++ % count($args))];
+}
+
+// ------------------------------------------------------------------------
+
+/**
+ * Repeater function
+ *
+ * @access	public
+ * @param	string
+ * @param	integer	number of repeats
+ * @return	string
+ */	
+function repeater($data, $num = 1)
+{
+	return (($num > 0) ? str_repeat($data, $num) : '');
+} 
+
+
 ?>
\ No newline at end of file
